﻿#ifndef UPLOAD_FILE_MANAGER_H
#define UPLOAD_FILE_MANAGER_H

#include <QObject>
#include <QNetworkReply>
class QNetworkAccessManager;
class UploadFileManager : public QObject
{
    Q_OBJECT
public:
    explicit UploadFileManager(QObject *parent = nullptr);
    QNetworkAccessManager *manager;
public:
    /**
     * @brief UploadFile
     * @param url
     * @param filePath
     */
    void UploadFile(QString url,QString filePath);
public Q_SLOTS:
    void slotUploadFinished(QNetworkReply *reply);
signals:
    /**
     * @brief sigFinish
     * @param status
     */
    void sigFinish(QNetworkReply::NetworkError status);
    /**
     * @brief sigUploadProgress
     * @param value
     */
    void sigUploadProgress(int value);
};

#endif // UPLOAD_FILE_MANAGER_H
